/*
 * @Author: cl
 * @Description:
 * @Date: 2023-04-21 09:17:58
 * @LastEditTime: 2023-05-06 10:23:10
 * @FilePath: \jsnode\nestjs\naota\src\user\user.module.ts
 * @LastEditors: cl
 */
import { Module } from '@nestjs/common'
import { JwtModule } from '@nestjs/jwt'
import { TypeOrmModule } from '@nestjs/typeorm'
import { jwtKey } from 'src/config'
import { User } from './entities/user.entity'
import { JwtToken } from './strategy/jwt.strategy'
import { UserController } from './user.controller'
import { UserService } from './user.service'

@Module({
  imports: [
    TypeOrmModule.forFeature([User]),
    JwtModule.register({
      secret: jwtKey.secret,
      signOptions: { expiresIn: '1h' },
    })
  ],
  controllers: [UserController],
  providers: [UserService,JwtToken],
})
export class UserModule {}
